package com.zhuky.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zhuky.entity.User;

@Controller
@RequestMapping("/err")
public class ErrorController {
	
	@ResponseBody
	@RequestMapping("/error")
	public User error() {
		
		int i=1/0;
		return null;
	}
	
	@ResponseBody
	@RequestMapping("/ajaxerror")
	public String ajaxerror() {	
		int i=1/0;
		return "hello";
	}
	
	@RequestMapping("/test")
	public String test() {	
		return "thymeleaf/ajaxerror";
	}
}
